﻿using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EntityModel
{
    public class HallDbcontext : DbContext
    {
        public HallDbcontext(DbContextOptions<HallDbcontext> opts) : base(opts) { }

        public DbSet<EM_User> EM_User { get; set; }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            modelBuilder.Entity<EM_User>().HasData(
                [
                new EM_User(){
                    Id=Guid.NewGuid(),
                    FirstName="ZH",
                    LastName="JU",
                    Type=1,
                    Pay=1111,
                    Gender=11111,
                    Age=1111,
                    AddTime=DateTime.Now,
                    HolidayTime=DateTime.Now

                }
                ]);

        }
    }
}
